package com.wangtao.firstapp.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

import com.wangtao.firstapp.R;

/**
 * 编辑心愿单页面
 * Created by lanouhn on 16/9/13.
 */
public class EditorWishActivity extends Activity implements View.OnClickListener {

    private ImageButton back;
    private TextView save;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_editorwish);
        initView();
        initEvent();
    }

    private void initView() {
        back = (ImageButton) findViewById(R.id.back_act_editorwish);//左上角返回
        save = (TextView) findViewById(R.id.save_act_editorwish);//右上角保存
    }

    private void initEvent() {
        back.setOnClickListener(this);
        save.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            //在这里先把 保存 ，也做成返回
            case R.id.back_act_editorwish:
            case R.id.save_act_editorwish:
                finish();
                break;
        }
    }
}
